package com.qwz.learn;

/**
* @Description: 同事类的抽象父类
* @Package com.qwz.learn.Colleague
* @author Qiuwuzhi
* @date 2019/12/24 14:02
* @version V1.0
*/
public abstract class Colleague {
    /**
     * 持有中介者对象
     */
    private Mediator mediator;

    /**
     * 构造方法，传入中间件对象
     * @param mediator
     */
    public Colleague(Mediator mediator) {
        this.mediator = mediator;
    }

    /**
     * 获取当前同事类对应的中介者对象
     * @return
     */
    public Mediator getMediator() {
        return mediator;
    }
}
